package com.tools.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@AllArgsConstructor
@ToString
@Document(indexName = "jd_goods",shards = 3,replicas = 1)
public class Content implements Serializable {
    private static final long serialVersionUID = -8049497962627482693L;

    @Field(type = FieldType.Text)
    private String id;
    private String name;
    private String img;
    private String price;

    public Content() {

    }
    public Content(String name, String img, String price) {
        this.name=name;
        this.img=img;
        this.price=price;
    }
}